package com.smtlive.domain;

import java.util.Collection;

import org.springframework.security.core.userdetails.UserDetails;

public class SmtUserDetails implements UserDetails {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4583795243624340436L;
	
	User user;
	Collection<SmtGrantedAuthority> smtGrantedAuthority;
	
	public SmtUserDetails(User user, Collection<SmtGrantedAuthority> smtGrantedAuthority) {
		this.user = user;
		this.smtGrantedAuthority = smtGrantedAuthority;
	}
	
	@Override
	public Collection<SmtGrantedAuthority> getAuthorities() {
		return smtGrantedAuthority;
	}

	@Override
	public String getPassword() {
		return user.getPassword();
	}

	@Override
	public String getUsername() {
		return user.getUserName();
	}

	@Override
	public boolean isAccountNonExpired() {
		// TODO Auto-generated method stub
		return true;
	}

	@Override
	public boolean isAccountNonLocked() {
		// TODO Auto-generated method stub
		return true;
	}

	@Override
	public boolean isCredentialsNonExpired() {
		// TODO Auto-generated method stub
		return true;
	}

	@Override
	public boolean isEnabled() {
		// TODO Auto-generated method stub
		return true;
	}

}
